package cn.kgc.service.hr;

import cn.kgc.dao.hr.QingJiaDao;
import cn.kgc.pojo.*;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: wang
 * @date: 2022/2/10
 * @description:
 */
@Service
public class QingJiaServiceImpl implements QingJiaService{
    @Resource
    private QingJiaDao qingJiaDao;
    @Override
    public List<Dict> selDictQ(Integer id) {
        return qingJiaDao.selDictQ(id);
    }


    @Override
    public Department selZhiW(Integer id) {
        return qingJiaDao.selZhiW(id);
    }

    @Override
    public String selShen(Integer id) {
        return qingJiaDao.selShen(id);
    }

    @Override
    public List<String> selName(Integer id) {
        return qingJiaDao.selName(id);
    }

    @Override
    public boolean addLe(Leaveapply leaveapply) {
        if (qingJiaDao.addLe(leaveapply)>-1){
            return true;
        }
        return false;
    }

    @Override
    public boolean addTr(Travelrequest travelrequest) {
        if (qingJiaDao.addTr(travelrequest)>-1){
            return true;
        }
        return false;
    }

    @Override
    public List<Leaveapply> selBy(Integer id,Integer state) {
        return qingJiaDao.selBy(id,state);
    }

    @Override
    public List<Travelrequest> selByTr(Integer id,Integer state) {
        return qingJiaDao.selByTr(id,state);
    }

    @Override
    public boolean updLe(Integer id) {
        if (qingJiaDao.updLe(id)>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean updTr(Integer id) {
        if (qingJiaDao.updTr(id)>0){
            return true;
        }
        return false;
    }

    @Override
    public Travelrequest selBytr(Integer id) {
        return qingJiaDao.selBytr(id);
    }

    @Override
    public Leaveapply selByle(Integer id) {
        return qingJiaDao.selByle(id);
    }

}
